package com.jadobo.xswing.swing.action;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JFrame;

import com.jadobo.xswing.render.IRenderer;
import com.jadobo.xswing.render.impl.SwingServiceFacade;

public class SubmitActionListener implements ActionListener {
	
	private String pageName;
	private JFrame target;
	private IRenderer renderer;
	
	@Override
	public void actionPerformed(ActionEvent e) {
		
		SwingServiceFacade.loadPage(renderer, target, pageName);
		
	}

	/**
	 * @return the pageName
	 */
	public String getPageName() {
		return pageName;
	}

	/**
	 * @param pageName the pageName to set
	 */
	public void setPageName(String pageName) {
		this.pageName = pageName;
	}

	/**
	 * @return the target
	 */
	public JFrame getTarget() {
		return target;
	}

	/**
	 * @param target the target to set
	 */
	public void setTarget(JFrame target) {
		this.target = target;
	}

	/**
	 * @return the renderer
	 */
	public IRenderer getRenderer() {
		return renderer;
	}

	/**
	 * @param renderer the renderer to set
	 */
	public void setRenderer(IRenderer renderer) {
		this.renderer = renderer;
	}

}
